import { request } from "@/api/request";
/* 查看方案 */
export function get(projectId: number, parameter: object) {
  return request({
    url: `/solution/${projectId}`,
    method: "get",
    params: parameter,
  });
}
/* 增加方案 */
export function add(data: object) {
  return request({
    url: `/solution/general`,
    method: "post",
    data: data,
  });
}
/* 更新方案 */
export function update(data: object) {
  return request({
    url: `/solution/update/general`,
    method: "post",
    data: data,
  });
}
/* 删除方案 */
export function del(projectId: number, solutionId: number) {
  return request({
    url: `/solution/${projectId}/${solutionId}`,
    method: "delete",
  });
}
/* 方案评估 */
export function eva(projectId: number, solutionId: number) {
  return request({
    url: `/solution/evaluate/${projectId}/${solutionId}`,
    method: "get",
  });
}

export default {
  get,
  add,
  update,
  del,
  eva,
};
